package com.maxatime.pojo;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.maxatime.utils.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

public class StudentMessage {


    private String checkCode;

    public String getCheckCode() {
        return checkCode;
    }

    public void setCheckCode(String checkCode) {
        this.checkCode = checkCode;
    }

    private String gradeGradeId;
    private String dormitoryDormitoryId;


    public String getGradeGradeId() {
        return gradeGradeId;
    }

    public void setGradeGradeId(String gradeGradeId) {
        this.gradeGradeId = gradeGradeId;
    }

    @Override
    public String toString() {
        return "StudentMessage{" +
                "gradeGradeId='" + gradeGradeId + '\'' +
                ", dormitoryDormitoryId='" + dormitoryDormitoryId + '\'' +
                ", dormitoryName='" + dormitoryName + '\'' +
                ", gradeName='" + gradeName + '\'' +
                ", province='" + province + '\'' +
                ", city='" + city + '\'' +
                ", area='" + area + '\'' +
                ", provinces1=" + provinces1 +
                ", cities1=" + cities1 +
                ", areas1=" + areas1 +
                ", areas=" + areas +
                ", cities=" + cities +
                ", provinces=" + provinces +
                ", nativePlace='" + nativePlace + '\'' +
                ", studentId=" + studentId +
                ", studentNum=" + studentNum +
                ", studentName='" + studentName + '\'' +
                ", mobile='" + mobile + '\'' +
                ", sex=" + sex +
                ", age=" + age +
                ", idType=" + idType +
                ", idNum='" + idNum + '\'' +
                ", birthday=" + birthday +
                ", deleteFlag=" + deleteFlag +
                ", createDate=" + createDate +
                ", updateDate=" + updateDate +
                ", detailAddr='" + detailAddr + '\'' +
                ", provincesId=" + provincesId +
                ", citiesId=" + citiesId +
                ", areasId=" + areasId +
                ", remark='" + remark + '\'' +
                '}';
    }

    public String getDormitoryDormitoryId() {
        return dormitoryDormitoryId;
    }

    public void setDormitoryDormitoryId(String dormitoryDormitoryId) {
        this.dormitoryDormitoryId = dormitoryDormitoryId;
    }

    private String dormitoryName;

    public String getDormitoryName() {
        return dormitoryName;
    }

    public void setDormitoryName(String dormitoryName) {
        this.dormitoryName = dormitoryName;
    }

    private String gradeName;

    public String getGradeName() {
        return gradeName;
    }

    public void setGradeName(String gradeName) {
        this.gradeName = gradeName;
    }

    private String province;
    private String city;
    private String area;



    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    private Provinces provinces1;

    private Cities cities1;

    private Areas areas1;

    public Provinces getProvinces1() {
        return provinces1;
    }

    public void setProvinces1(Provinces provinces1) {
        this.provinces1 = provinces1;
    }

    public Cities getCities1() {
        return cities1;
    }

    public void setCities1(Cities cities1) {
        this.cities1 = cities1;
    }

    public Areas getAreas1() {
        return areas1;
    }

    public void setAreas1(Areas areas1) {
        this.areas1 = areas1;
    }

    private List<Areas> areas;
      private List<Cities> cities;
      private List<Provinces> provinces;

    public List<Areas> getAreas() {
        return areas;
    }

    public void setAreas(List<Areas> areas) {
        this.areas = areas;
    }

    public List<Cities> getCities() {
        return cities;
    }

    public void setCities(List<Cities> cities) {
        this.cities = cities;
    }

    public List<Provinces> getProvinces() {
        return provinces;
    }

    public void setProvinces(List<Provinces> provinces) {
        this.provinces = provinces;
    }

    private  String nativePlace;

    public String getNativePlace() {
        nativePlace=""+provinces1.getProvince()+cities1.getCity()+areas1.getArea();
        return nativePlace;
    }

    public void setNativePlace(String nativePlace) {
        this.nativePlace = nativePlace;
    }

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.stu_id
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private Integer studentId;


    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.stu_num
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private Integer studentNum;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.stu_name
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private String studentName;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.mobile
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private String mobile;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.sex
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private Integer sex;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.age
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private Integer age;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.id_type
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private Integer idType;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.id_num
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private String idNum;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.birthday
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.delete_flag
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    @TableLogic
    private Integer deleteFlag;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.create_date
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createDate;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.update_date
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date updateDate;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.detail_addr
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private String detailAddr;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.provinces_id
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private Integer provincesId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.cities_id
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private Integer citiesId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.areas_id
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private Integer areasId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column student_message.remark
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    private String remark;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.stu_id
     *
     * @return the value of student_message.stu_id
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public Integer getStudentId() {
        return studentId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.stu_id
     *
     * @param studentId the value for student_message.stu_id
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setStudentId(Integer studentId) {
        this.studentId = studentId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.stu_num
     *
     * @return the value of student_message.stu_num
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public Integer getStudentNum() {
        return studentNum;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.stu_num
     *
     * @param studentNum the value for student_message.stu_num
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setStudentNum(Integer studentNum) {
        this.studentNum = studentNum;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.stu_name
     *
     * @return the value of student_message.stu_name
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public String getStudentName() {
        return studentName;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.stu_name
     *
     * @param studentName the value for student_message.stu_name
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setStudentName(String studentName) {
        this.studentName = studentName == null ? null : studentName.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.mobile
     *
     * @return the value of student_message.mobile
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public String getMobile() {
        return mobile;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.mobile
     *
     * @param mobile the value for student_message.mobile
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setMobile(String mobile) {
        this.mobile = mobile == null ? null : mobile.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.sex
     *
     * @return the value of student_message.sex
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public Integer getSex() {
        return sex;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.sex
     *
     * @param sex the value for student_message.sex
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setSex(Integer sex) {
        this.sex = sex;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.age
     *
     * @return the value of student_message.age
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public Integer getAge() {
        int age=0;
        try {
            age= DateUtils.getAge(birthday);
        }catch(Exception e) {
            e.printStackTrace();
        }
        return age;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.age
     *
     * @param age the value for student_message.age
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setAge(Integer age) {
        this.age = age;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.id_type
     *
     * @return the value of student_message.id_type
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public Integer getIdType() {
        return idType;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.id_type
     *
     * @param idType the value for student_message.id_type
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setIdType(Integer idType) {
        this.idType = idType;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.id_num
     *
     * @return the value of student_message.id_num
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public String getIdNum() {
        return idNum;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.id_num
     *
     * @param idNum the value for student_message.id_num
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setIdNum(String idNum) {
        this.idNum = idNum == null ? null : idNum.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.birthday
     *
     * @return the value of student_message.birthday
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public Date getBirthday() {
        return birthday;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.birthday
     *
     * @param birthday the value for student_message.birthday
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.delete_flag
     *
     * @return the value of student_message.delete_flag
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.delete_flag
     *
     * @param deleteFlag the value for student_message.delete_flag
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.create_date
     *
     * @return the value of student_message.create_date
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.create_date
     *
     * @param createDate the value for student_message.create_date
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.update_date
     *
     * @return the value of student_message.update_date
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public Date getUpdateDate() {
        return updateDate;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.update_date
     *
     * @param updateDate the value for student_message.update_date
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.detail_addr
     *
     * @return the value of student_message.detail_addr
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public String getDetailAddr() {
        return detailAddr;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.detail_addr
     *
     * @param detailAddr the value for student_message.detail_addr
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setDetailAddr(String detailAddr) {
        this.detailAddr = detailAddr == null ? null : detailAddr.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.provinces_id
     *
     * @return the value of student_message.provinces_id
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public Integer getProvincesId() {
        return provincesId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.provinces_id
     *
     * @param provincesId the value for student_message.provinces_id
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setProvincesId(Integer provincesId) {
        this.provincesId = provincesId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.cities_id
     *
     * @return the value of student_message.cities_id
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public Integer getCitiesId() {
        return citiesId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.cities_id
     *
     * @param citiesId the value for student_message.cities_id
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setCitiesId(Integer citiesId) {
        this.citiesId = citiesId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.areas_id
     *
     * @return the value of student_message.areas_id
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public Integer getAreasId() {
        return areasId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.areas_id
     *
     * @param areasId the value for student_message.areas_id
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setAreasId(Integer areasId) {
        this.areasId = areasId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column student_message.remark
     *
     * @return the value of student_message.remark
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public String getRemark() {
        return remark;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column student_message.remark
     *
     * @param remark the value for student_message.remark
     *
     * @mbg.generated Thu Jul 15 19:48:22 CST 2021
     */
    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }


}